download test data to build directory (fixes #212)
authorSteven G. Johnson <stevenj@alum.mit.edu>
Sat, 19 Dec 2020 18:08:34 +0000 (13:08 -0500)
committerSteven G. Johnson <stevenj@alum.mit.edu>
Sat, 19 Dec 2020 18:08:34 +0000 (13:08 -0500)
CMakeLists.txt

index ea6b80e171908e9c7ca6088d06b91e47e203ff3f..de7717cd1f0ca39d0e47da1ae39e697b777ac08a 100644 (file)
@@ -65,8 +65,8 @@ if(UTF8PROC_ENABLE_TESTING)
   enable_testing()
   file(MAKE_DIRECTORY data)
   set(UNICODE_VERSION 13.0.0)
-  file(DOWNLOAD https://www.unicode.org/Public/${UNICODE_VERSION}/ucd/NormalizationTest.txt data/NormalizationTest.txt SHOW_PROGRESS)
-  file(DOWNLOAD https://www.unicode.org/Public/${UNICODE_VERSION}/ucd/auxiliary/GraphemeBreakTest.txt data/GraphemeBreakTest.txt SHOW_PROGRESS)
+  file(DOWNLOAD https://www.unicode.org/Public/${UNICODE_VERSION}/ucd/NormalizationTest.txt ${CMAKE_BINARY_DIR}/data/NormalizationTest.txt SHOW_PROGRESS)
+  file(DOWNLOAD https://www.unicode.org/Public/${UNICODE_VERSION}/ucd/auxiliary/GraphemeBreakTest.txt ${CMAKE_BINARY_DIR}/data/GraphemeBreakTest.txt SHOW_PROGRESS)
   add_executable(case test/tests.h test/tests.c utf8proc.h test/case.c)
   target_link_libraries(case utf8proc)
   add_executable(custom test/tests.h test/tests.c utf8proc.h test/custom.c)